<!DOCTYPE html>
<html lang="zh-CN">
<head><meta name="generator" content="Hexo 3.9.0">

    <!--[if lt IE 9]>
        <style>body {display: none; background: none !important} </style>
        <meta http-equiv="Refresh" Content="0; url=//outdatedbrowser.com/" />
    <![endif]-->

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="format-detection" content="telephone=no">
<meta name="author" content="Ren ZM">



<meta name="description" content="简单记录MySql稍微复杂点的语法规则。">
<meta name="keywords" content="note,MySql">
<meta property="og:type" content="article">
<meta property="og:title" content="MySql简单使用-adv">
<meta property="og:url" content="https://littlepro.gitee.io/mytpages/2019/10/24/MySql简单使用-adv/index.html">
<meta property="og:site_name" content="Xbiubiubiu">
<meta property="og:description" content="简单记录MySql稍微复杂点的语法规则。">
<meta property="og:locale" content="zh-CN">
<meta property="og:updated_time" content="2019-11-02T02:25:30.203Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="MySql简单使用-adv">
<meta name="twitter:description" content="简单记录MySql稍微复杂点的语法规则。">

<link rel="apple-touch-icon" href="/mytpages//apple-touch-icon.png">


    <link rel="alternate" href="/atom.xml" title="Xbiubiubiu" type="application/atom+xml">



    <link rel="shortcut icon" href="/mytpages//favicon.png">



    <link href="//cdn.bootcss.com/animate.css/3.5.1/animate.min.css" rel="stylesheet">



    <link href="//cdn.bootcss.com/fancybox/2.1.5/jquery.fancybox.min.css" rel="stylesheet">



    <script src="//cdn.bootcss.com/pace/1.0.2/pace.min.js"></script>
    <link href="//cdn.bootcss.com/pace/1.0.2/themes/blue/pace-theme-minimal.css" rel="stylesheet">


<link rel="stylesheet" href="/mytpages/css/style.css">



<link href="//cdn.bootcss.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet">


<title>MySql简单使用-adv | Xbiubiubiu</title>

<script src="//cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>
<script src="//cdn.bootcss.com/clipboard.js/1.5.10/clipboard.min.js"></script>

<script>
    var yiliaConfig = {
        fancybox: true,
        animate: true,
        isHome: false,
        isPost: true,
        isArchive: false,
        isTag: false,
        isCategory: false,
        fancybox_js: "//cdn.bootcss.com/fancybox/2.1.5/jquery.fancybox.min.js",
        scrollreveal: "//cdn.bootcss.com/scrollReveal.js/3.1.4/scrollreveal.min.js",
        search: false
    }
</script>


    <script> yiliaConfig.jquery_ui = [false]; </script>



    <script> yiliaConfig.rootUrl = /mytpages/; </script>







    <script src="/mytpages/live2d-widget/autoload.js"></script>


</head></html>
<body>
  <div id="container">
    <div class="left-col">
    <div class="overlay"></div>
<div class="intrude-less">
    <header id="header" class="inner">
        <a href="/mytpages/" class="profilepic">
            <img src="/mytpages//img/avatar.png" class="animated zoomIn">
        </a>
        <hgroup>
          <h1 class="header-author"><a href="/mytpages/">Ren ZM</a></h1>
        </hgroup>

        
        <p class="header-subtitle">--ロリは正義</p>
        

        


        
            <div id="switch-btn" class="switch-btn">
                <div class="icon">
                    <div class="icon-ctn">
                        <div class="icon-wrap icon-house" data-idx="0">
                            <div class="birdhouse"></div>
                            <div class="birdhouse_holes"></div>
                        </div>
                        <div class="icon-wrap icon-ribbon hide" data-idx="1">
                            <div class="ribbon"></div>
                        </div>
                        
                        <div class="icon-wrap icon-link hide" data-idx="2">
                            <div class="loopback_l"></div>
                            <div class="loopback_r"></div>
                        </div>
                        
                        
                        <div class="icon-wrap icon-me hide" data-idx="3">
                            <div class="user"></div>
                            <div class="shoulder"></div>
                        </div>
                        
                    </div>
                    
                </div>
                <div class="tips-box hide">
                    <div class="tips-arrow"></div>
                    <ul class="tips-inner">
                        <li>菜单</li>
                        <li>标签</li>
                        
                        <li>友情链接</li>
                        
                        
                        <li>关于我</li>
                        
                    </ul>
                </div>
            </div>
        

        <div id="switch-area" class="switch-area">
            <div class="switch-wrap">
                <section class="switch-part switch-part1">
                    <nav class="header-menu">
                        <ul>
                        
                            <li><a href="/mytpages//mytpages/../">主页</a></li>
                        
                            <li><a href="/mytpages//mytpages/../archives/">所有文章</a></li>
                        
                            <li><a href="/mytpages//mytpages/../tags/">标签云</a></li>
                        
                            <li><a href="/mytpages//mytpages/../about/">关于我</a></li>
                        
                        </ul>
                    </nav>
                    <nav class="header-nav">
                        <ul class="social">
                            
                                <a class="fa Email" href="mailto:784709355@qq.com" title="Email"></a>
                            
                                <a class="fa GitHub" href="https://github.com/rzzz" title="GitHub"></a>
                            
                                <a class="fa Gitee" href="https://gitee.com/littlepro" title="Gitee"></a>
                            
                                <a class="fa V2EX" href="/mytpages/" title="V2EX"></a>
                            
                                <a class="fa 知乎" href="/mytpages/" title="知乎"></a>
                            
                                <a class="fa 网易云音乐" href="/mytpages/" title="网易云音乐"></a>
                            
                                <a class="fa bilibili" href="/mytpages/" title="bilibili"></a>
                            
                        </ul>
                    </nav>
                </section>
                
                
                <section class="switch-part switch-part2">
                    <div class="widget tagcloud" id="js-tagcloud">
                        <ul class="tag-list"><li class="tag-list-item"><a class="tag-list-link" href="/mytpages/tags/JavaScript/">JavaScript</a></li><li class="tag-list-item"><a class="tag-list-link" href="/mytpages/tags/MySql/">MySql</a></li><li class="tag-list-item"><a class="tag-list-link" href="/mytpages/tags/NodeJS/">NodeJS</a></li><li class="tag-list-item"><a class="tag-list-link" href="/mytpages/tags/Nodejs/">Nodejs</a></li><li class="tag-list-item"><a class="tag-list-link" href="/mytpages/tags/PS3/">PS3</a></li><li class="tag-list-item"><a class="tag-list-link" href="/mytpages/tags/c/">c</a></li><li class="tag-list-item"><a class="tag-list-link" href="/mytpages/tags/c/">c++</a></li><li class="tag-list-item"><a class="tag-list-link" href="/mytpages/tags/cocos2dx/">cocos2dx</a></li><li class="tag-list-item"><a class="tag-list-link" href="/mytpages/tags/markdown/">markdown</a></li><li class="tag-list-item"><a class="tag-list-link" href="/mytpages/tags/note/">note</a></li><li class="tag-list-item"><a class="tag-list-link" href="/mytpages/tags/sort/">sort</a></li><li class="tag-list-item"><a class="tag-list-link" href="/mytpages/tags/test/">test</a></li><li class="tag-list-item"><a class="tag-list-link" href="/mytpages/tags/tool/">tool</a></li><li class="tag-list-item"><a class="tag-list-link" href="/mytpages/tags/usage/">usage</a></li></ul>
                    </div>
                </section>
                
                
                
                <section class="switch-part switch-part3">
                    <div id="js-friends">
                    
                      <a class="main-nav-link switch-friends-link" href="https://hexo.io">Hexo</a>
                    
                      <a class="main-nav-link switch-friends-link" href="https://pages.github.com/">GitHub</a>
                    
                      <a class="main-nav-link switch-friends-link" href="http://moxfive.xyz/">MOxFIVE</a>
                    
                    </div>
                </section>
                

                
                
                <section class="switch-part switch-part4">
                
                    <div id="js-aboutme">ロリは正義</div>
                </section>
                
            </div>
        </div>
    </header>                
</div>
    </div>
    <div class="mid-col">
      <nav id="mobile-nav">
      <div class="overlay">
          <div class="slider-trigger"></div>
          <h1 class="header-author js-mobile-header hide"><a href="/" title="回到主页">Ren ZM</a></h1>
      </div>
    <div class="intrude-less">
        <header id="header" class="inner">
            <a href="/mytpages/" class="profilepic">
                <img src="/mytpages//img/avatar.png" class="animated zoomIn">
            </a>
            <hgroup>
              <h1 class="header-author"><a href="/mytpages/" title="回到主页">Ren ZM</a></h1>
            </hgroup>
            
            <p class="header-subtitle">--ロリは正義</p>
            
            <nav class="header-menu">
                <ul>
                
                    <li><a href="/mytpages/../">主页</a></li>
                
                    <li><a href="/mytpages/../archives/">所有文章</a></li>
                
                    <li><a href="/mytpages/../tags/">标签云</a></li>
                
                    <li><a href="/mytpages/../about/">关于我</a></li>
                
                <div class="clearfix"></div>
                </ul>
            </nav>
            <nav class="header-nav">
                        <ul class="social">
                            
                                <a class="fa Email" target="_blank" href="mailto:784709355@qq.com" title="Email"></a>
                            
                                <a class="fa GitHub" target="_blank" href="https://github.com/rzzz" title="GitHub"></a>
                            
                                <a class="fa Gitee" target="_blank" href="https://gitee.com/littlepro" title="Gitee"></a>
                            
                                <a class="fa V2EX" target="_blank" href="/mytpages/" title="V2EX"></a>
                            
                                <a class="fa 知乎" target="_blank" href="/mytpages/" title="知乎"></a>
                            
                                <a class="fa 网易云音乐" target="_blank" href="/mytpages/" title="网易云音乐"></a>
                            
                                <a class="fa bilibili" target="_blank" href="/mytpages/" title="bilibili"></a>
                            
                        </ul>
            </nav>
        </header>                
    </div>
    <link class="menu-list" tags="标签" friends="友情链接" about="关于我"/>
</nav>
      <div class="body-wrap"><article id="post-MySql简单使用-adv" class="article article-type-post" itemscope itemprop="blogPost">
  
    <div class="article-meta">
      <a href="/mytpages/2019/10/24/MySql简单使用-adv/" class="article-date">
      <time datetime="2019-10-24T06:45:13.000Z" itemprop="datePublished">2019-10-24</time>
</a>


    </div>
  
  <div class="article-inner">
    
      <input type="hidden" class="isFancy" />
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      MySql简单使用-adv
    </h1>
  

      </header>
      
      <div class="article-info article-info-post">
        
    <div class="article-category tagcloud">
    <a class="article-category-link" href="/mytpages/categories/how/">how</a>
    </div>


        
    <div class="article-tag tagcloud">
        <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/mytpages/tags/MySql/">MySql</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/mytpages/tags/note/">note</a></li></ul>
    </div>

        <div class="clearfix"></div>
      </div>
      
    
    <div class="article-entry" itemprop="articleBody">
      
          
        <p>简单记录MySql稍微复杂点的语法规则。</p>
<a id="more"></a>

<h3 id="索引"><a href="#索引" class="headerlink" title="索引"></a>索引</h3><p>优化查询的有效方法是为经常查询的字段建立索引,一般是where的判断条件的那列，如无索引查询数据时，会遍历整张表。<br>索引为一个表的某个字段组创立了快速查找key，通常是构建一个B+树。<br>一般都会为一张表，创立一个id主键，且自增长，那么sql一般就会自动的为它创立索引。<br>索引也会有它的缺点：虽然索引大大提高了查询速度，同时却会降低更新表的速度，如对表进行INSERT、UPDATE和DELETE。因为更新表时，MySQL不仅要保存数据，还要保存一下索引文件。</p>
<p>创建索引：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">1.在创建表时指定索引：</span><br><span class="line">CREATE TABLE mytable(</span><br><span class="line">ID INT NOT NULL,</span><br><span class="line">username VARCHAR(16) NOT NULL,</span><br><span class="line">INDEX [indexName] (ID)</span><br><span class="line">);</span><br><span class="line">2.修改表结构(添加索引)</span><br><span class="line">ALTER table tableName ADD INDEX indexName(columnName)</span><br><span class="line">3.在表上创立索引</span><br><span class="line">CREATE INDEX indexName ON mytable(columnName);</span><br></pre></td></tr></table></figure>

<h3 id="事务"><a href="#事务" class="headerlink" title="事务"></a>事务</h3><p>事务是逻辑上的一组操作，组成这组操作的各个单元，要么全都成功要么全都失败。<br>具备ACID：原子性，一致性，隔离性，持久性<br>a在执行sql语句之前，我们要开启事务:start transaction;<br>b正常执行我们的sql语句:…<br>c当sql语句执行完毕，存在两种情况<br>    1，全都成功，我们要将sql语句对数据库造成的影响提交到数据库中:commit;<br>    2，某些sql语句失败，我们执行rollback（回滚），将对数据库操作赶紧撤销:rollback;<br>mysql数据支持事务，但是要求必须是innoDB存储引擎。</p>
<p>并发事务处理带来的问题:<br>更新丢失, 脏读, 不可重复读, 幻读。</p>
<p>解决事务并发问题引入的事务隔离级别：<br>数据库的事务隔离越严格，并发副作用越小，但付出的代价也就越大，因为事务隔离实质上就是使事务在一定程度上 “串行化”进行，这显然与“并发”是矛盾的。<br>许多应用对“不可重复读”和“幻读”并不敏感，可能更关心数据并发访问的能力。<br>四种级别：未提交读，已提交读，可重复读，可序列化。<br>MySQL默认事务隔离级别是可重复读。</p>
<h3 id="锁"><a href="#锁" class="headerlink" title="锁"></a>锁</h3><p>SQL的DML语句默认就是一个事务的，是原子操作，所以每个sql语句都具备原子性，那么就确定了一个时刻只会执行一个DML语句。<br>对于事务，它包含了多条DML语句，事务的并发执行，会带来数据错误，所以需要锁机制来解决并发问题。</p>
<p>行锁：开销大，加锁慢；会出现死锁；锁定粒度小，发生锁冲突的概率低，并发度高。<br>加锁的方式：自动加锁。对于UPDATE、DELETE和INSERT语句，InnoDB会自动给涉及数据集加排他锁；对于普通SELECT语句，InnoDB不会加任何锁；当然我们也可以显式的加锁。</p>
<p>表锁：开销小，加锁快；不会出现死锁；锁定力度大，发生锁冲突概率高，并发度最低。<br>加锁的方式：自动加锁。查询操作（SELECT），会自动给涉及的所有表加读锁，更新操作（UPDATE、DELETE、INSERT），会自动给涉及的表加写锁。也可以显式加锁。</p>
<p>InnoDB只有在通过索引条件检索数据时使用行级锁，否则使用表锁！<br>为了保证数据的一致完整性，任何一个数据库都存在锁定机制。锁定机制的优劣直接影响到一个数据库的并发处理能力和性能。</p>
<p>显示加锁方式：<br>SELECT … LOCK IN SHARE MODE(加共享锁);<br>SELECT … FOR UPDATE(加排他锁);</p>
<p>在编程语言的语法层次上，我们可以使用语言提供的锁，来使得一段代码，在一个进程中同一时刻只有一个线程可以运行，这几乎就是事务隔离级别的可序列化了，<br>但是也存在多个进程的情况，所以还是要依赖数据库服务器的锁机制。</p>
<h3 id="并发编程中的技巧锁"><a href="#并发编程中的技巧锁" class="headerlink" title="并发编程中的技巧锁"></a>并发编程中的技巧锁</h3><p>悲观锁：<br>特点是先获取锁，再进行业务操作，即“悲观”的认为获取锁是非常有可能失败的，因此要先确保获取锁成功再进行业务操作。<br>通常所说的“一锁二查三更新”即指的是使用悲观锁。通常来讲在数据库上的悲观锁需要数据库本身提供支持，即通过常用的select … for update操作来实现悲观锁。<br>当数据库执行select for update时会获取被select中的数据行的行锁，因此其他并发执行的select for update如果试图选中同一行则会发生排斥（需要等待行锁被释放），因此达到锁的效果。<br>select for update获取的行锁会在当前事务结束时自动释放，因此必须在事务中使用。</p>
<p>乐观锁：<br>特点先进行业务操作，不到万不得已不去拿锁。即“乐观”的认为拿锁多半是会成功的，因此在进行完业务操作需要实际更新数据的最后一步再去拿一下锁就好。<br>乐观锁在数据库上的实现完全是逻辑的，不需要数据库提供特殊的支持。一般的做法是在需要锁的数据上增加一个版本号，或者时间戳，然后按照如下方式实现：<br>1.SELECT data AS old_data, version AS old_version FROM …;<br>2.根据获取的数据进行业务操作，得到new_data和new_version<br>3.UPDATE SET data = new_data, version = new_version WHERE version = old_version<br>if (updated row &gt; 0) {<br>    // 乐观锁获取成功，操作完成<br>} else {<br>    // 乐观锁获取失败，回滚并重试<br>}</p>
<h3 id="存储过程"><a href="#存储过程" class="headerlink" title="存储过程"></a>存储过程</h3><p>可以理解为mysql中的函数，暂时忽略。</p>
<h3 id="自定义函数"><a href="#自定义函数" class="headerlink" title="自定义函数"></a>自定义函数</h3><p>这个和存储过程有点相近，暂时忽略。</p>
<h3 id="触发器"><a href="#触发器" class="headerlink" title="触发器"></a>触发器</h3><p>触发器创建语法四要素：1.监视地点(table) 2.监视事件(insert/update/delete) 3.触发时间(after/before) 4.触发事件(insert/update/delete)<br>语法：<br>    create trigger triggerName<br>    after/before insert/update/delete on 表名<br>        for each row<br>        begin<br>            sql语句;<br>        end;<br>暂时忽略。</p>

      
    </div>
    
  </div>
  
    


    <nav id="article-nav">
        
            <div id="article-nav-newer" class="article-nav-title">
                <a href="/mytpages/2019/10/25/不会懂分布式系统的/">
                    不会懂分布式系统的
                </a>
            </div>
        
        
            <div id="article-nav-older" class="article-nav-title">
                <a href="/mytpages/2019/10/24/MySql简单使用/">
                    MySql简单使用
                </a>
            </div>
        
    </nav>

  
</article>

    <div id="toc" class="toc-article">
        <strong class="toc-title">文章目录</strong>
        
            <ol class="toc"><li class="toc-item toc-level-3"><a class="toc-link" href="#索引"><span class="toc-number">1.</span> <span class="toc-text">索引</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#事务"><span class="toc-number">2.</span> <span class="toc-text">事务</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#锁"><span class="toc-number">3.</span> <span class="toc-text">锁</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#并发编程中的技巧锁"><span class="toc-number">4.</span> <span class="toc-text">并发编程中的技巧锁</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#存储过程"><span class="toc-number">5.</span> <span class="toc-text">存储过程</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#自定义函数"><span class="toc-number">6.</span> <span class="toc-text">自定义函数</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#触发器"><span class="toc-number">7.</span> <span class="toc-text">触发器</span></a></li></ol>
        
    </div>
    <style>
        .left-col .switch-btn,
        .left-col .switch-area {
            display: none;
        }
        .toc-level-3 i,
        .toc-level-3 ol {
            display: none !important;
        }
    </style>

    <input type="button" id="tocButton" value="隐藏目录"  title="点击按钮隐藏或者显示文章目录">

    <script>
        yiliaConfig.toc = ["隐藏目录", "显示目录", !!"false"];
    </script>



    
<div class="share">
    
        <div class="bdsharebuttonbox">
            <a href="#" class="fa fa-twitter bds_twi" data-cmd="twi" title="分享到推特"></a>
            <a href="#" class="fa fa-weibo bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
            <a href="#" class="fa fa-qq bds_sqq" data-cmd="sqq" title="分享给 QQ 好友"></a>
            <a href="#" class="fa fa-files-o bds_copy" data-cmd="copy" title="复制网址"></a>
            <a href="#" class="fa fa fa-envelope-o bds_mail" data-cmd="mail" title="通过邮件分享"></a>
            <a href="#" class="fa fa-weixin bds_weixin" data-cmd="weixin" title="生成文章二维码"></a>
            <a href="#" class="fa fa-share-alt bds_more" data-cmd="more"></i></a>
        </div>
        <script>
            window._bd_share_config={
                "common":{"bdSnsKey":{},"bdText":"MySql简单使用-adv　| Xbiubiubiu　","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"24"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];
        </script>
    

    
</div>







    




    <div class="scroll" id="post-nav-button">
        
            <a href="/mytpages/2019/10/25/不会懂分布式系统的/" title="上一篇: 不会懂分布式系统的">
                <i class="fa fa-angle-left"></i>
            </a>
        

        <a title="文章列表"><i class="fa fa-bars"></i><i class="fa fa-times"></i></a>

        
            <a href="/mytpages/2019/10/24/MySql简单使用/" title="下一篇: MySql简单使用">
                <i class="fa fa-angle-right"></i>
            </a>
        
    </div>

    <ul class="post-list"><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/12/13/cpp：allocator-new/">cpp：allocator,new</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/11/28/CPP标准库-note/">CPP标准库-note</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/11/27/C与win32API/">C与win32API</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/11/27/C标准库-note/">C标准库</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/11/26/cpp的lib和dll/">cpp的lib和dll</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/11/25/编译cpp-vs2015/">编译cpp-vs2015</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/11/23/编译cpp-准备/">编译c++准备</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/11/18/simple-opengl/">simple opengl</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/11/15/cocos2dx-action/">cocos2dx-action</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/11/15/cocos2dx-schedule/">cocos2dx-schedule</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/11/14/cocos2dx在win32上写日志文件/">cocos2dx在win32上写日志文件</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/11/14/cocos2dx在win32上播放ogg/">cocos2dx在win32上播放ogg</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/11/14/cocos2dx字库缺失文字处理/">cocos2dx字库缺失文字处理</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/11/14/cocos2dx工作目录修改/">cocos2dx工作目录修改</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/11/13/cocos2dx-android/">cocos2dx-android</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/11/12/cocos2dx-win32/">cocos2dx-win32</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/11/11/Sublimer-Text/">Sublimer Text</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/11/07/潜意识？？设计模式/">潜意识？？设计模式</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/11/04/BST？AVL？红黑树？/">BST？AVL？红黑树？</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/11/01/几种排序算法示例代码/">几种排序算法示例代码</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/10/31/引子-基础算法？？/">引子-基础算法？？</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/10/31/引子-数据结构？？/">引子-数据结构？？</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/10/25/不会懂分布式系统的/">不会懂分布式系统的</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/10/24/MySql简单使用-adv/">MySql简单使用-adv</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/10/24/MySql简单使用/">MySql简单使用</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/10/18/PS3-HEN破相关记录/">PS3-HEN破相关记录</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/10/09/测试使用云函数扩展码云page/">测试使用云函数扩展码云page</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/10/09/web3-单页Web应用/">web3.单页Web应用</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/09/29/web2-简单网站的前后端分离/">web2.简单网站的前后端分离</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/09/29/web1-创建一个简单的网站/">web1.创建一个简单的网站</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/09/27/NodeJS-简单使用/">NodeJS 简单使用</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/09/27/JavaScript-other/">JavaScript-other</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/09/27/JavaScript-模块/">JavaScript-模块</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/09/27/JavaScript-简单使用/">JavaScript 简单使用</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/09/27/github-gitee-chrome文件树插件/">github & gitee chrome文件树插件</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/09/26/markdown-简单使用/">markdown 简单使用示例</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/09/25/hello-world/">Hello World</a></li><li class="post-list-item"><a class="post-list-link" href="/mytpages/2019/09/24/zzTest-article0/">zzTest article0</a></li></ul>




    <script>
        
    </script>
</div>
      <footer id="footer">
    <div class="outer">
        <div id="footer-info">
            <div class="footer-left">
                <i class="fa fa-copyright"></i> 
                2019-2020 Ren ZM
            </div>
            <div class="footer-right">
                <a href="http://hexo.io/" target="_blank" title="快速、简洁且高效的博客框架">Hexo</a>  Theme <a href="https://github.com/MOxFIVE/hexo-theme-yelee" target="_blank" title="简而不减 Hexo 双栏博客主题  v3.5">Yelee</a> by MOxFIVE <i class="fa fa-heart animated infinite pulse"></i>
            </div>
        </div>
        
            <div class="visit">
                
                    <span id="busuanzi_container_site_pv" style='display:none'>
                        <span id="site-visit" title="本站到访数"><i class="fa fa-user" aria-hidden="true"></i><span id="busuanzi_value_site_uv"></span>
                        </span>
                    </span>
                
                
                    <span>| </span>
                
                
                    <span id="busuanzi_container_page_pv" style='display:none'>
                        <span id="page-visit"  title="本页阅读量"><i class="fa fa-eye animated infinite pulse" aria-hidden="true"></i><span id="busuanzi_value_page_pv"></span>
                        </span>
                    </span>
                
            </div>
        
    </div>
</footer>
    </div>
    
<script data-main="/mytpages/js/main.js" src="//cdn.bootcss.com/require.js/2.2.0/require.min.js"></script>

    <script>
        $(document).ready(function() {
            var iPad = window.navigator.userAgent.indexOf('iPad');
            if (iPad > -1 || $(".left-col").css("display") === "none") {
                var bgColorList = ["#9db3f4", "#414141", "#e5a859", "#f5dfc6", "#c084a0", "#847e72", "#cd8390", "#996731"];
                var bgColor = Math.ceil(Math.random() * (bgColorList.length - 1));
                $("body").css({"background-color": bgColorList[bgColor], "background-size": "cover"});
            }
            else {
                var backgroundnum = 5;
                var backgroundimg = "url(/mytpages//background/bg-x.jpg)".replace(/x/gi, Math.ceil(Math.random() * backgroundnum));
                $("body").css({"background": backgroundimg, "background-attachment": "fixed", "background-size": "cover"});
            }
        })
    </script>





<div class="scroll" id="scroll">
    <a href="#" title="返回顶部"><i class="fa fa-arrow-up"></i></a>
    <a href="#comments" onclick="load$hide();" title="查看评论"><i class="fa fa-comments-o"></i></a>
    <a href="#footer" title="转到底部"><i class="fa fa-arrow-down"></i></a>
</div>
<script>
    // Open in New Window
    
        var oOpenInNew = {
            
            
            
            
            
            
             archives: ".archive-article-title", 
             miniArchives: "a.post-list-link", 
            
             friends: "#js-friends a", 
             socail: ".social a" 
        }
        for (var x in oOpenInNew) {
            $(oOpenInNew[x]).attr("target", "_blank");
        }
    
</script>

<script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js">
</script>
  </div>
</body>
</html>